package com.xjy.rpc.register;

public enum RpcRegisterEnum {
    REDIS("redis"),
    ZOOKEEPER("zookeeper"),
    NACOS("nacos")
    ;
    public String type;

    RpcRegisterEnum(String s) {
        this.type = s;
    }

    public static RpcRegisterEnum RpcRegister(String type){
        for (RpcRegisterEnum value : values()){
            if (type.equals(value.name())){
                return value;
            }
        }
        return null;
    }

    public static void main(String[] args) {
        System.out.println(RpcRegisterEnum.RpcRegister("REDIS"));
    }
}
